package com.renjiyue.dao;
//客户类：一般客户类都会去找代理
public class Client {
    public static void main(String[] args) {
        //真实角色
        Host host = new Host();
        //代理实例的调用处理程序
        ProxyInvocationHandler handler = new ProxyInvocationHandler();
        handler.setRent(host);//将真实角色放置进去
        Rent proxy = (Rent) handler.getProxy();
        proxy.rent();
    }
}
